package com.desmart.ht;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.desmart.ht.utils.ToastUtils;

public class ScreeningActivity extends BaseActivity implements View.OnClickListener {

    private TextView tvRelevanceContent;
    private TextView tvTypeContent;
    private TextView tvCategoryContent;
    private TextView tvStatusContent;
    private View vBack;

    public static void start(Context context){
        Intent intent = new Intent(context,ScreeningActivity.class);
        context.startActivity(intent);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_screening);
        initViews();
    }

    private void initViews() {
        TextView tvTitle = findViewById(R.id.common_content_tv);
        vBack = findViewById(R.id.common_back_iv);
        vBack.setOnClickListener(this);
        tvTitle.setText("筛选");

        //相关度
        View relevanceView = findViewById(R.id.view_relevance);
        TextView tvRelevanceTitle = relevanceView.findViewById(R.id.tv_item_title);
        tvRelevanceContent = relevanceView.findViewById(R.id.tv_item_content);
        tvRelevanceContent.setOnClickListener(this);
        tvRelevanceTitle.setText("相关度");
        //类型
        View typeView = findViewById(R.id.view_type);
        TextView tvTypeTitle = typeView.findViewById(R.id.tv_item_title);
        tvTypeContent = typeView.findViewById(R.id.tv_item_content);
        tvTypeContent.setOnClickListener(this);
        tvTypeTitle.setText("类型");
        //类别
        View categoryView = findViewById(R.id.view_category);
        TextView tvCategoryTitle = categoryView.findViewById(R.id.tv_item_title);
        tvCategoryContent = categoryView.findViewById(R.id.tv_item_content);
        tvCategoryContent.setOnClickListener(this);
        tvCategoryTitle.setText("类别");
        //状态
        View statusView = findViewById(R.id.view_status);
        TextView tvStatusTitle = statusView.findViewById(R.id.tv_item_title);
        tvStatusContent = statusView.findViewById(R.id.tv_item_content);
        tvStatusContent.setOnClickListener(this);
        tvStatusTitle.setText("状态");


    }

    @Override
    public void onClick(View view) {
        if (view == vBack){
            onBackPressed();
        } else if (view == tvRelevanceContent){
            ToastUtils.show("相关度");
        }else if (view == tvTypeContent){
            ToastUtils.show("类行");
        }else if (view == tvCategoryContent){
            ToastUtils.show("类别");
        }else if (view == tvStatusContent){
            ToastUtils.show("状态");
        }
    }
}
